package com.gxa.ssm340.service.impl;

import com.gxa.ssm340.entity.pojo.Points;
import com.gxa.ssm340.mapper.PointsMapper;
import com.gxa.ssm340.service.PointsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Ben
 * @date 2023-10-24 11:35
 */
@Service
@Transactional(rollbackFor = Throwable.class)
public class PointsServiceImpl implements PointsService {

    @Autowired
    private PointsMapper pointsMapper;


    @Override
    public List<Points> getPoints(String phone) {
        List<Points> points = pointsMapper.selectGetPointsByPhone(phone);
        return points;
    }

    @Override
    public List<Points> exchangePoints(String phone) {
        List<Points> points = pointsMapper.selectExchangePointsByPhone(phone);
        return points;
    }
}
